jQuery.validator.addMethod("mobile", function(value, element) {
    if(value.length==0)
    {
        return true;
    }
    var pattern = /0?(13|14|15|18|17)[0-9]{9}/;
    return pattern.test(value);
},function(params, element) {
    return $(element).data('error-msg')===undefined?"<i class='fa fa-times-circle'></i> 请输入正确的移动电话号码":$(element).data('error-msg');
});

jQuery.validator.addMethod("phone", function(value, element) {
    var pattern = /[0-9-()（）]{7,18}/;
    return pattern.test(value);
},function(params, element) {
    return $(element).data('error-msg')===undefined?"<i class='fa fa-times-circle'></i> 请输入正确的固定电话号码":$(element).data('error-msg');
});